package com.wulinbus.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.wulinbus.dao.creative.CreativeDAO;
import com.wulinbus.model.CreativeLikeFlagModel;
import com.wulinbus.model.CreativeModel;
import com.wulinbus.service.CreativeService;
@Service
public class CreativeServiceImpl implements CreativeService{
	@Resource
	private CreativeDAO creativeDAO;
	public List<CreativeModel> findCreativeByTitle(String search) {
		return creativeDAO.findCreativeByTitle(search);
	}

	@Override
	public int getMaxCid() {
		// TODO Auto-generated method stub
		return creativeDAO.getMaxCid();
	}

	@Override
	public void addCreative(CreativeModel creativeModel_c) {
		creativeDAO.addCreative(creativeModel_c);
	}

	@Override
	public void addCreativeUrl(CreativeModel creativeModel_u) {
		// TODO Auto-generated method stub
		creativeDAO.addCreativeUrl(creativeModel_u);
	}

	@Override
	public List<CreativeModel> getCreativeList(String keyword,Integer start, Integer count) {
		// TODO Auto-generated method stub
		return creativeDAO.getCreativeList(keyword,start,count);
	}

	@Override
	public Integer count(String keyword) {
		// TODO Auto-generated method stub
		return creativeDAO.count(keyword);
	}

	@Override
	public List<CreativeModel> getCreativeUrlList(Integer cid) {
		// TODO Auto-generated method stub
		return creativeDAO.getCreativeUrlList(cid);
	}

	@Override
	public void like(Integer cid) {
		// TODO Auto-generated method stub
		creativeDAO.like(cid);
	}

	@Override
	public CreativeModel getCreativeByCid(Integer cid) {
		// TODO Auto-generated method stub
		return creativeDAO.getCreativeByCid(cid);
	}

	@Override
	public CreativeModel findCreativeByCreativeTitle(String title) {
		// TODO Auto-generated method stub
		return creativeDAO.findCreativeByCreativeTitle(title);
	}

	@Override
	public List<CreativeModel> findCreativeByUid(Integer uid, Integer start,
			Integer pageSize) {
		// TODO Auto-generated method stub
		return creativeDAO.findCreativeByUid(uid,start,pageSize);
	}

	@Override
	public List<CreativeModel> findCreativeListByUids(List<Integer> uids) {
		// TODO Auto-generated method stub
		return creativeDAO.findCreativeListByUids(uids);
	}

	@Override
	public List<CreativeModel> findCreativeListByCids(List<Integer> cids) {
		// TODO Auto-generated method stub
		return creativeDAO.findCreativeListByCids(cids);
	}

	@Override
	public List<CreativeModel> findCreativeListByMids(List<Integer> mids) {
		// TODO Auto-generated method stub
		return creativeDAO.findCreativeListByMids(mids);
	}
	
	@Override
	public Integer countByUid(Integer uid) {
		// TODO Auto-generated method stub
		return creativeDAO.countByUid(uid);
	}

	@Override
	public List<CreativeModel> findCreativeByUidOnly(Integer uid) {
		// TODO Auto-generated method stub
		return creativeDAO.findCreativeByUidOnly(uid);
	}

	public List<String> getUrlListByCid(Integer cid) {
		// TODO Auto-generated method stub
		return creativeDAO.getUrlListByCid(cid);
	}

	@Override
	public void updateCreative(CreativeModel creativeModel) {
		// TODO Auto-generated method stub
		creativeDAO.updateCreative(creativeModel);
	}

	@Override
	public void deleteCreativeUrl(Integer cid) {
		// TODO Auto-generated method stub
		creativeDAO.deleteCreativeUrl(cid);
	}

	@Override
	public void setLikeFlag(Integer cid, String uid) {
		// TODO Auto-generated method stub
		creativeDAO.setLikeFlag(cid,uid);
	}

	@Override
	public CreativeLikeFlagModel getCreativeLikeModel(Integer cid, String uid) {
		// TODO Auto-generated method stub
		return creativeDAO.getCreativeLikeModel(cid,uid);
	}

	@Override
	public Integer getLikeByCid(Integer cid) {
		// TODO Auto-generated method stub
		return creativeDAO.getLikeByCid(cid);
	}
	@Override
	public Integer deleteCreativeUrlByMid(Integer mid,Integer cid){
		// TODO Auto-generated method stub
		return creativeDAO.deleteCreativeUrlByMid(mid,cid);
	}

	@Override
	public List<CreativeModel> getMaxLikeCreativeList() {
		// TODO Auto-generated method stub
		return creativeDAO.getMaxLikeCreativeList();
	}

	@Override
	public List<CreativeModel> getAllCreative(Integer start, Integer pageSize) {
		// TODO Auto-generated method stub
		return creativeDAO.getAllCreative(start,pageSize);
	}

	@Override
	public Integer delete(Integer cid) {
		// TODO Auto-generated method stub
		return creativeDAO.delete(cid);
	}
}
